package it.fuzzylogics.gwt.geolocation.client.core;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * Created by IntelliJ IDEA.
 * User: hrothgar
 * Date: Jul 6, 2009
 * Time: 4:41:27 PM
 * To change this template use File | Settings | File Templates.
 */

/**
 * Position interface

    interface Position {
    readonly attribute Coordinates coords;
    readonly attribute DOMTimeStamp timestamp;
    };


    Coordinates interface

    interface Coordinates {
    readonly attribute double latitude;
    readonly attribute double longitude;
    readonly attribute double altitude;
    readonly attribute double accuracy;
    readonly attribute double altitudeAccuracy;
    readonly attribute double heading;
    readonly attribute double speed;
    };
   http://dev.w3.org/geo/api/spec-source.html
 */
 public class Position extends JavaScriptObject {
    protected Position() { }


     public final native String getLat() /*-{ return this.coords.latitude; }-*/;
     public final native String getLng()  /*-{ return this.coords.longitude;  }-*/;
     public final native String getTimestamp() /*-{ return this.timestamp; }-*/;
     public final native String getAltitude() /*-{ return this.coords.altitude; }-*/;
     public final native String getAccuracy() /*-{ return this.coords.accuracy; }-*/;
     public final native String getAltitudeAccuracy() /*-{ return this.coords.altitudeAccuracy; }-*/;
     public final native String getHeading() /*-{ return this.coords.heading; }-*/;
     public final native String getSpeed() /*-{ return this.coords.speed; }-*/;
}
